package com.fms.data.messaging;

import com.fms.model.domain.IExistingFlowSheets;
import com.fms.model.messaging.IMessager;
import com.fms.model.messaging.domain.DraftMessage;

public class RegisteringEmailer  implements IMessager
{
	private IMessager	messager;
	private IExistingFlowSheets	sheets;

	public RegisteringEmailer(IMessager _messager, IExistingFlowSheets _sheets)
	{
		this.messager = _messager;
		this.sheets = _sheets;
	}

	@Override
	public void send(DraftMessage message) throws Exception
	{
		messager.send(message);
		sheets.registerAsEmailed(message.getSheet());
		
	}

}
